<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml"/>

	<xsl:template match="formalAssertions">
		<!--the path is relative to the output file directory-->
		<xsl:processing-instruction name="xml-stylesheet" select="('type=&quot;text/xsl&quot;','href=&quot;../xsl/presentation/style/mathml.xsl&quot;')"/>
		<html xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/1999/xhtml">
			<head></head>
			<title>Problem in English</title>
			<body>
				<!--xsl:for-each select="./formalRepresentation[not(position()=last())]"><xsl:apply-templates select="."/></xsl:for-each-->
				<ul>
					<xsl:for-each select="./formalRepresentation"><xsl:apply-templates select="."/></xsl:for-each>
				</ul>
			</body>
		</html>
	</xsl:template>

	<xsl:template match="formalRepresentation">
		<li>
			<div><b><xsl:value-of select="@name"/></b></div>
			<xsl:text>If </xsl:text><xsl:apply-templates select="assumption"/>
			<xsl:text>then </xsl:text><xsl:apply-templates select="objective"/>
		</li>
	</xsl:template>

	<xsl:template match="assumption">
		<xsl:for-each select="./*[not(position()=last())]"><xsl:apply-templates select="."/><xsl:text>; </xsl:text></xsl:for-each>
		<xsl:apply-templates select="./*[position()=last()]"/><xsl:text>; </xsl:text>
	</xsl:template>

	<xsl:template match="objective">
		<xsl:for-each select="./*[not(position()=last())]"><xsl:apply-templates select="."/><xsl:text>; </xsl:text></xsl:for-each>
		<xsl:apply-templates select="./*[position()=last()]"/><xsl:text>. </xsl:text>
	</xsl:template>

	<xsl:template match="conceptObject">
		<xsl:choose>
			<!--quantityFunction element could not end with ';'-->
			<!--templates of translating concept objects into English-->
			<xsl:when test="string(./vocabulary)='point'">
				<xsl:text>a point</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='segment'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[name()='pointer'])=2">
						<xsl:text>segment </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:apply-templates select="./argument/*[2]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>the segment with endpoints </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text> and </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='segments'">
				<xsl:text>segments </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='line'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[name()='pointer'])=2">
						<xsl:text>line </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:apply-templates select="./argument/*[2]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>the line passing through </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text> and </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='lines'">
					<xsl:text>the lines passing through </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
					<xsl:text> and </xsl:text>
					<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='halfline'">
				<xsl:text>the halfline from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='halflines'">
				<xsl:text>the halflines from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='length'">
				<xsl:text>the length of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='lengths'">
				<xsl:text>the lengths of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='triangle'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[name()='pointer'])=3">
						<xsl:text>triangle </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:apply-templates select="./argument/*[3]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>the triangle with vertices </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text>, </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:text>, and </xsl:text>
						<xsl:apply-templates select="./argument/*[3]"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='triangles'">
				<xsl:text>the triangles with vertices </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text>, </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text>, and </xsl:text>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='quadreilateral'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[name()='pointer'])=4">
						<xsl:text>quadreilateral </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:apply-templates select="./argument/*[3]"/>
						<xsl:apply-templates select="./argument/*[4]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>the quadreilateral with vertices </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text>, </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:text>, </xsl:text>
						<xsl:apply-templates select="./argument/*[3]"/>
						<xsl:text>, and </xsl:text>
						<xsl:apply-templates select="./argument/*[4]"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='quadreilaterals'">
				<xsl:text>the quadreilaterals with vertices </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text>, </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text>, </xsl:text>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:text>, and </xsl:text>
				<xsl:apply-templates select="./argument/*[4]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='angle'">
				<xsl:if test="count(./argument/*[@type])=2">
					<xsl:text>angle formed by rotating </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
					<xsl:text> anticlockwise to </xsl:text>
					<xsl:apply-templates select="./argument/*[2]"/>
				</xsl:if>
				<xsl:if test="count(./argument/*[@type])=3">
					<xsl:text>angle </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
					<xsl:apply-templates select="./argument/*[2]"/>
					<xsl:apply-templates select="./argument/*[3]"/>
				</xsl:if>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='angles'">
				<xsl:if test="count(./argument/*[@type])=2">
					<xsl:text>angles formed by rotating </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
					<xsl:text> anticlockwise to </xsl:text>
					<xsl:apply-templates select="./argument/*[2]"/>
				</xsl:if>
				<xsl:if test="count(./argument/*[@type])=3">
					<xsl:text>angles formed by </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
					<xsl:apply-templates select="./argument/*[2]"/>
					<xsl:apply-templates select="./argument/*[3]"/>
				</xsl:if>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='size'">
				<xsl:text>the size of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='sizes'">
				<xsl:text>the sizes of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='conic'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[name()='pointer'])=5">
						<xsl:text>conic </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:apply-templates select="./argument/*[3]"/>
						<xsl:apply-templates select="./argument/*[4]"/>
						<xsl:apply-templates select="./argument/*[5]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>the conic with vertices </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text>, </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:text>, </xsl:text>
						<xsl:apply-templates select="./argument/*[3]"/>
						<xsl:text>, </xsl:text>
						<xsl:apply-templates select="./argument/*[4]"/>
						<xsl:text>, and </xsl:text>
						<xsl:apply-templates select="./argument/*[5]"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='conics'">
				<xsl:text>the conics with vertices </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text>, </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text>, </xsl:text>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:text>, </xsl:text>
				<xsl:apply-templates select="./argument/*[4]"/>
				<xsl:text>, and </xsl:text>
				<xsl:apply-templates select="./argument/*[5]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='arc'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[name()='pointer'])=3">
						<xsl:text>arc </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:apply-templates select="./argument/*[3]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>the arc with vertices </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text>, </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:text>, and </xsl:text>
						<xsl:apply-templates select="./argument/*[3]"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='circle'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[@type])=3">
						<xsl:text>the circle through </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text>, </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
						<xsl:text>, and </xsl:text>
						<xsl:apply-templates select="./argument/*[3]"/>
					</xsl:when>
					<xsl:when test="count(./argument/*[@type])=2 and (contains(@type,'distance')=true() or contains(@type, 'length')=true())">
						<xsl:text>the circle with center </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text> and radius </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:text>the circle with center </xsl:text>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text> through </xsl:text>
						<xsl:apply-templates select="./argument/*[2]"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='distance'">
				<xsl:text>the distance from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='distances'">
				<xsl:text>the distances from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> respectively</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='ratio'">
				<xsl:text>the ratio of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='ratios'">
				<xsl:text>the ratios of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> respectively</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='oppositeside'">
				<xsl:text>the opposite side of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> in </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='oppositesides'">
				<xsl:text>the opposite sides of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> in </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> respectively</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='side'">
				<xsl:text>side </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='sides'">
				<xsl:text>the three sides of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='endpoint'">
				<xsl:text>the two endpoints of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='vertex'">
				<xsl:text>the three vertices of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='orthocenter'">
				<xsl:text>the orthercenter of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='centroid'">
				<xsl:text>the centroid of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='barycenter'">
				<xsl:text>the barycenter of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='geometriccenter'">
				<xsl:text>the geometric center of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='incenter'">
				<xsl:text>the incenter of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='center'">
				<xsl:text>the center of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='circumcenter'">
				<xsl:text>the circumcenter of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='circumradius'">
				<xsl:text>the circumradius of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='radius'">
				<xsl:text>the radius of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='inradius'">
				<xsl:text>the inradius of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='perpendicularline'">
				<xsl:text>the line through </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> perpendicular to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='parallelline'">
				<xsl:text>the line through </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> parallel to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='midperpendicularline'">
				<xsl:text>the perpendicular bisector of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='pointon'">
				<xsl:text>a point on </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='pointson'">
				<xsl:text>points on </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='midpoint'">
				<xsl:if test="count(./argument/*[@type])=1">
					<xsl:text>the middle point of </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
				</xsl:if>
				<xsl:if test="count(./argument/*[@type])=2">
					<xsl:text>the middle point between </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
					<xsl:text> and </xsl:text>
					<xsl:apply-templates select="./argument/*[2]"/>
				</xsl:if>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='midpoints'">
				<xsl:if test="count(./argument/*[@type])=1">
					<xsl:text>the middle points of </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
				</xsl:if>
				<xsl:if test="count(./argument/*[@type])=2">
					<xsl:text>the middle points between </xsl:text>
					<xsl:apply-templates select="./argument/*[1]"/>
					<xsl:text> and </xsl:text>
					<xsl:apply-templates select="./argument/*[2]"/>
				</xsl:if>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='foot'">
				<xsl:text>the foot of the perpendicular from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='feet'">
				<xsl:text>the feet of the perpendiculars from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='intersection'">
				<xsl:text>the intersection point of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='intersections'">
				<xsl:text>the two intersection points of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='tangentpoint'">
				<xsl:text>the tangent point of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='tangentlines'">
				<xsl:text>the two tangent lines from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='tangentline'">
				<xsl:text>the tangent line from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='SBintangentcircle' or string(./vocabulary)='BSintangentcircle'">
				<xsl:text>the circle with center </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> inscribed with </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='extangentcircle'">
				<xsl:text>the excircle of </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> with center </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='tangentcircle'">
				<xsl:text>the circle tangent to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> with center </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='median'">
				<xsl:text>the median from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='medians'">
				<xsl:text>the three medians of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='cevian'">
				<xsl:text>a cevian from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='altitude'">
				<xsl:text>the altitude from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='altitudeline'">
				<xsl:text>the altitude line through </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='altitudes'">
				<xsl:text>the three altitudes of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='altitudelines'">
				<xsl:text>the three altitude lines of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='bisectorline'">
				<xsl:text>the bisector line formed by rotating </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> anticlockwise to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='bisectorlines'">
				<xsl:text>the two bisector lines of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='innerbisectorline'">
				<xsl:text>the inner bisector line of angle </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='innerbisector'">
				<xsl:text>the inner bisector of angle </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='innerbisectors'">
				<xsl:text>the three inner bisectors of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='exbisectorline'">
				<xsl:text>the external bisector line of angle </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='exbisector'">
				<xsl:text>the external bisector of angle </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='exbisectors'">
				<xsl:text>the three external bisectors of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='ninepointcircle'">
				<xsl:text>the nine-point circle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='Eulerpoint'">
				<xsl:text>the Euler point from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> in </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='Eulerline'">
				<xsl:text>the Euler line of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='collinearline'">
				<xsl:text>the line passing through </xsl:text>
				<xsl:choose>
					<xsl:when test="count(./argument/*[@type])>=3">
						<xsl:for-each select="./argument/*[not(position()=last())]">
							<xsl:apply-templates select="."/>
							<xsl:text>, </xsl:text>
						</xsl:for-each>
						<xsl:text>and </xsl:text>
						<xsl:apply-templates select="./argument/*[position()=last()]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:apply-templates select="./argument/*[1]"/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='choosediff'">
				<xsl:text>arbitrary </xsl:text>
				<xsl:value-of select="./quantity/text()"/>
				<xsl:text> taken from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='concurrentpoint'">
				<xsl:text>the concurrent point of </xsl:text>
				<xsl:for-each select="./argument/*[not(position()=last())]">
					<xsl:apply-templates select="."/>
					<xsl:text>, </xsl:text>
				</xsl:for-each>
				<xsl:text>and </xsl:text>
				<xsl:apply-templates select="./argument/*[position()=last()]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='circumcircle'">
				<xsl:text>the circumcircle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='incircle'">
				<xsl:text>the inscribed circle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='excircle'">
				<xsl:text>the excircle through </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> externally tangent to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='excircles'">
				<xsl:text>the three excircle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='escenter'">
				<xsl:text>the escenter of the excircle through </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> externally tangent to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='escenters'">
				<xsl:text>the three escenters of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='tritangentcircle'">
				<xsl:text>the four tritangentcircles of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='equilateraltriangle'">
				<xsl:text>the equilateraltriangle </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='externalequilateraltriangle'">
				<xsl:text>the equilateraltriangle erected externally on </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> oppositely with </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='Napoleontriangle'">
				<xsl:text>the Napoleontriangle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='diagonals'">
				<xsl:text>the diagonals of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='completequadrilateral'">
				<xsl:text>a completequadrilateral, such that line </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> intersects line </xsl:text>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
				<xsl:text> at </xsl:text>
				<xsl:apply-templates select="./argument/*[5]"/>
				<xsl:text> and line </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:text> intersects line </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
				<xsl:text> at </xsl:text>
				<xsl:apply-templates select="./argument/*[6]"/>
				<xsl:text>, </xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='Gaussline'">
				<xsl:text>the Gauss line of quantrilateral </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='Simsonline'">
				<xsl:text>the Simson line of </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> from </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='mediator'">
				<xsl:text>the mediator of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='orthictriangle'">
				<xsl:text>the orthictriangle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='homotheticcenter'">
				<xsl:text>the homothetic center of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='tangetialtriangle'">
				<xsl:text>the tangetialtriangle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='circumdiameterline'">
				<xsl:text>the line through </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and the circumcetner of triangle </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='symmetrypoint'">
				<xsl:text>the symmetry point of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> with respect to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='anticomplementarytriangle'">
				<xsl:text>the anticomplementarytriangle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='anticenter'">
				<xsl:text>the anticenter of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='maltitudes'">
				<xsl:text>the maltitudes of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='cyclicquadrilateral'">
				<xsl:text>cyclicquadrilateral </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='orthodiagonalquadrilateral'">
				<xsl:text>orthodiagonalquadrilateral </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='parallelogram'">
				<xsl:text>parallelogram </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='Miquelcircle'">
				<xsl:text>the Miquelcircle </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
				<xsl:apply-templates select="./argument/*[5]"/>
				<xsl:text> with respect to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='contacttriangle'">
				<xsl:text>the contacttriangle of </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
			</xsl:when>


			<!--templates of translating predicates into English-->
			<xsl:when test="string(./vocabulary)='incident'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> is on </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='perpendicular'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> is perpendicular to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='parallel'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> is parallel to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='is'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> are identical</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='equal'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> is equal to </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='isout'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> is outside of </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='isin'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> lies inside </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='collinear'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[@type])>=3">
						<xsl:for-each select="./argument/*[not(position()=last())]">
							<xsl:apply-templates select="."/>
							<xsl:text>, </xsl:text>
						</xsl:for-each>
						<xsl:text>and </xsl:text>
						<xsl:apply-templates select="./argument/*[position()=last()]"/>
						<xsl:text> are collinear</xsl:text>
					</xsl:when>
					<xsl:otherwise>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text> are collinear</xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='concurrent'">
				<xsl:choose>
					<xsl:when test="count(./argument/*[@type])>=3">
						<xsl:for-each select="./argument/*[not(position()=last())]">
							<xsl:apply-templates select="."/>
							<xsl:text>, </xsl:text>
						</xsl:for-each>
						<xsl:text>and </xsl:text>
						<xsl:apply-templates select="./argument/*[position()=last()]"/>
						<xsl:text> are cocurrent</xsl:text>
					</xsl:when>
					<xsl:otherwise>
						<xsl:apply-templates select="./argument/*[1]"/>
						<xsl:text> are concurrent</xsl:text>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='intersect'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> intersects </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='sameside'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> lies on the same side of </xsl:text>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='differentside'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> lies on different side of </xsl:text>
				<xsl:apply-templates select="./argument/*[3]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='tangent'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> are tangent</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='extangent'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> are extangent</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='intangent'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> are inscribed</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='BSintangent'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> are inscribed</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='SBintangent'">
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text> are inscribed</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='Pappus'">
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:text> lies on the line through </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:text>; </xsl:text>
				<xsl:apply-templates select="./argument/*[6]"/>
				<xsl:text> lies on the line through </xsl:text>
				<xsl:apply-templates select="./argument/*[4]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./argument/*[5]"/>
				<xsl:text>; </xsl:text>
				<xsl:text>line </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[5]"/>
				<xsl:text> intersects line </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
				<xsl:text> at </xsl:text>
				<xsl:apply-templates select="./argument/*[7]"/>
				<xsl:text>; </xsl:text>
				<xsl:text>line </xsl:text>
				<xsl:apply-templates select="./argument/*[1]"/>
				<xsl:apply-templates select="./argument/*[6]"/>
				<xsl:text> intersects line </xsl:text>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:apply-templates select="./argument/*[4]"/>
				<xsl:text> at </xsl:text>
				<xsl:apply-templates select="./argument/*[8]"/>
				<xsl:text>; </xsl:text>
				<xsl:text>line </xsl:text>
				<xsl:apply-templates select="./argument/*[2]"/>
				<xsl:apply-templates select="./argument/*[6]"/>
				<xsl:text> intersects line </xsl:text>
				<xsl:apply-templates select="./argument/*[3]"/>
				<xsl:apply-templates select="./argument/*[5]"/>
				<xsl:text> at </xsl:text>
				<xsl:apply-templates select="./argument/*[9]"/>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='concyclic'">
				<xsl:for-each select="./*[not(position()=last())]">
					<xsl:apply-templates select="."/>
					<xsl:text>, </xsl:text>
				</xsl:for-each>
				<xsl:apply-templates select="./*[position()=last()]"/>
				<xsl:text> lie on the same circle</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='homothetic'">
				<xsl:apply-templates select="./*[1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./*[2]"/>
				<xsl:text> are homothetic;</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='antiparallel'">
				<xsl:apply-templates select="./*[1]"/>
				<xsl:text>, </xsl:text>
				<xsl:apply-templates select="./*[2]"/>
				<xsl:text>, and </xsl:text>
				<xsl:apply-templates select="./*[3]"/>
				<xsl:text> are antiparallel</xsl:text>
			</xsl:when>
			<xsl:when test="string(./vocabulary)='orthorcentricgroup'">
				<xsl:apply-templates select="./*[1]"/>
				<xsl:text> is the orthocenter of </xsl:text>
				<xsl:apply-templates select="./*[2]"/>
			</xsl:when>

			<xsl:otherwise>
				<xsl:apply-templates select="./argument/*[1]"/>
				<b>default</b>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="pointer">
		<xsl:value-of select="."/>
	</xsl:template>

	<xsl:template match="quantity">
		<xsl:value-of select="."/>
	</xsl:template>

	<xsl:template match="reference">
		<xsl:choose>
			<xsl:when test="./list">
				<xsl:apply-templates select="./*[1]"/>
				<xsl:text> are </xsl:text>
				<xsl:apply-templates select="./*[2]"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates select="./*[1]"/>
				<xsl:text> is </xsl:text>
				<xsl:apply-templates select="./*[2]"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="list">
		<xsl:choose>
			<xsl:when test="count(./conceptObject[@type])=count(./conceptObject[@type='point()']) and count(./conceptObject[@type])>0">
				<xsl:text>arbitrary points</xsl:text>
			</xsl:when>
			<xsl:when test="count(./*[@type])=2">
				<xsl:apply-templates select="./*[@type][1]"/>
				<xsl:text> and </xsl:text>
				<xsl:apply-templates select="./*[@type][2]"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:for-each select="./*[not(position()=last())]">
					<xsl:apply-templates select="."/>
					<xsl:text>, </xsl:text>
				</xsl:for-each>
				<xsl:text>and </xsl:text>
				<xsl:apply-templates select="./*[position()=last()]"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="give">
		<xsl:text>given </xsl:text>
		<xsl:for-each select="./*[not(position()=last())]">
			<xsl:apply-templates select="."/>
			<xsl:text>, </xsl:text>
		</xsl:for-each>
		<xsl:text> and </xsl:text>
		<xsl:apply-templates select="./*[position()=last()]"/>
		<xsl:text>, </xsl:text>
	</xsl:template>

	<xsl:template match="declare">
		<xsl:text>given </xsl:text>
		<xsl:for-each select="./*[not(position()=last())]">
			<xsl:text> a </xsl:text>
			<xsl:value-of select="lower-case(@type)"/>
			<xsl:text> </xsl:text>
			<xsl:apply-templates select="."/>
			<xsl:text>, </xsl:text>
		</xsl:for-each>
		<xsl:text>and a </xsl:text>
		<xsl:value-of select="./*[position()=last()]/lower-case(@type)"/>
		<xsl:text> </xsl:text>
		<xsl:apply-templates select="./*[position()=last()]"/>
	</xsl:template>

	<xsl:template match="quantityFunction">
		<xsl:if test="@name='times'">
			<xsl:for-each select="./*[not(position()=last())]">
				<xsl:apply-templates select="."/> times </xsl:for-each>
			<xsl:apply-templates select="./*[position()=last()]"/>
		</xsl:if>
		<xsl:if test="@name='plus'">
			<xsl:for-each select="./*[not(position()=last())]">
				<xsl:apply-templates select="."/> plus </xsl:for-each>
			<xsl:apply-templates select="./*[position()=last()]"/>
		</xsl:if>
		<xsl:if test="@name='minus'">
			<xsl:for-each select="./*[not(position()=last())]">
				<xsl:apply-templates select="."/> minus </xsl:for-each>
			<xsl:apply-templates select="./*[position()=last()]"/>
		</xsl:if>
	</xsl:template>


	<!--GDL play the role of OpenMath, the presentation language should be MathML-->

	<!--xsl:template match="argument">(<xsl:for-each select="./*[not(position()=last())]">
			<xsl:apply-templates select="."/>,</xsl:for-each>
		<xsl:apply-templates select="./*[position()=last()]"/>)</xsl:template>



	<xsl:template match="quantityFunction">
		<xsl:if test="@name='times'">times(
			<xsl:for-each select="./*[not(position()=last())]">
				<xsl:apply-templates select="."/>,</xsl:for-each>
			<xsl:apply-templates select="./*[position()=last()]"/>)</xsl:if>
		<xsl:if test="@name='plus'">
			<xsl:for-each select="./*[not(position()=last())]">
				<xsl:apply-templates select="."/>+</xsl:for-each>
			<xsl:apply-templates select="./*[position()=last()]"/>
		</xsl:if>
		<xsl:if test="@name='minus'">
			<xsl:for-each select="./*[not(position()=last())]">
				<xsl:apply-templates select="."/>-</xsl:for-each>
			<xsl:apply-templates select="./*[position()=last()]"/>
		</xsl:if>
	</xsl:template-->

	

</xsl:stylesheet>